//
//  UIViewController+ShowAlertController.h
//  Community
//
//  Created by Air on 2016/11/7.
//  Copyright © 2016年 MaryKayChina. All rights reserved.
//

#import <UIKit/UIKit.h>

//Block定义
typedef void (^FinishBlock)(void);

@interface UIViewController (ShowAlertController)

#pragma mark - UIAlertController Message Method

/**
 * 显示消息并确认关闭
 */
- (void)showAlertMessage:(NSString *)message withTitle:(NSString *)title;

/**
 * 显示多个Action操作的消息
 */
- (void)showAlertMessage:(NSString *)message withTitle:(NSString *)title withActions:(NSArray *)actions;


/**
* 显示多个Action操作的消息,actionSheet样式
*/
- (void)showActionSheetMessage:(NSString *)message withTitle:(NSString *)title withActions:(NSArray *)actions;

/**
 * 显示红色文字确认按钮的消息并确认关闭
 */
- (void)showRedActionAlertMessage:(NSString *)message withTitle:(NSString *)title;

/**
 * 显示消息框并在指定迟续时间后自动关闭
 *
 * @param message           消息内容
 * @param duration          消息显示迟续时间
 */
- (void)showAlertMessage:(NSString *)message withDuration:(CGFloat)duration;

/**
 * 显示消息框并在指定迟续时间后自动关闭，同时处理回调操作
 *
 * @param message           消息内容
 * @param duration          消息显示迟续时间
 * @param finishBlock       回调操作
 */
- (void)showAlertMessage:(NSString *)message withDuration:(CGFloat)duration withFinishBlock:(FinishBlock)finishBlock;


- (void)showAlertMessage:(NSString *)message
               withTitle:(NSString *)title
             cancelTitle:(NSString *)cancelTitle
                 okTitle:(NSString *)okTitle
             cancelBlock:(FinishBlock)cancelBlock
                 okBlock:(FinishBlock)okBlock;

@end
